package org.learnredis.university;

public enum StudyProfile {
    PHYSICS("PHYSICS"), MEDICINE("MEDICINE"), LINGUISTICS("LINGUISTICS"), MATHEMATICS("MATHEMATICS");
    private String profileName;

    StudyProfile(String value) {
        this.profileName = value;
    }

    public String getValue() {
        return profileName;
    }

    public static StudyProfile convert(String value) {
        for (StudyProfile studyProfile : StudyProfile.values()) {
            if (studyProfile.toString().equals(value)) {
                return studyProfile;
            }
        }
        return PHYSICS;
    }
}
